package top.gohigh.cameradata;

import android.app.Application;
import android.os.Handler;

import cn.jpush.android.api.JPushInterface;

public class MainApplication extends Application {

    public static final int DATE_INIT_COMPELETED=123;
    private static MainApplication sInstance=null;
    @Override
    public void onCreate() {
        super.onCreate();
        JPushInterface.setDebugMode(true);

        JPushInterface.init(this);

        sInstance=this;

    }

    //splash activity  加载数据
    void initDate(final Handler handler){
        //模拟数据加载
        handler.postDelayed(new Runnable() {
            @Override
            public void run() {
                handler.sendEmptyMessage(DATE_INIT_COMPELETED);
            }
        },200);
    }

    public static MainApplication getsInstance(){
        return  sInstance;
    }
}
